/**
 * 
 * @authors Your Name (you@example.org)
 * @date    2016-12-23 10:47:12
 * @version $Id$
 */

	var myChart = echarts.init(document.getElementsByClassName('index_echart_line')[0]);
    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '海尔'
        },
        toolbox: {
            show : true,
            feature : {
                // 提供下载
                saveAsImage : {show: true}
            }
        },
        // 设置背景颜色
        // backgroundColor:"#018b98",
        // 设置线条颜色
        color:['#4cd0dc','#66cc99'],
        tooltip: {},
        // 设置头文件颜色
        legend: {
            data:['销量','业绩']
        },
        axis:{
          show:false
        },
        xAxis: {
            data: ["周一","周二","周三","周四","周五","周六","周日"]
        },
        yAxis: {
        },
        series: [{
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20,54]
        },{
            name:'业绩',
            type:'bar',
            data:[10,20,66,4,39,40,82]
        }]
    };
    myChart.setOption(option);
    // 控制打印层
    setTimeout(function(){
    var img = new Image();
    img.src = myChart.getDataURL({
        type:"png",
        pixelRatio: 1,
        backgroundColor: '#fff'
    });
     // $('body').append(img);
    },3000);



	var myChart_2 = echarts.init(document.getElementsByClassName('index_echart_bar')[0]);
    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '海尔'
        },
        toolbox: {
            show : true,
            feature : {
                // 提供下载
                saveAsImage : {show: true}
            }
        },
        // 设置背景颜色
        // backgroundColor:"#018b98",
        // 设置线条颜色
        color:['#66cc99','#84bad8'],
        tooltip: {},
        // 设置头文件颜色
        legend: {
            data:['销量','业绩']
        },
        axis:{
          show:false
        },
        xAxis: {
            data: ["周一","周二","周三","周四","周五","周六","周日"]
        },
        yAxis: {
        },
        series: [{
            name: '销量',
            type: 'line',
            data: [5, 20, 36, 10, 10, 20,54]
        },{
            name:'业绩',
            type:'line',
            data:[10,20,66,4,39,40,82]
        }]
    };
    myChart_2.setOption(option);
    // 控制打印层
    setTimeout(function(){
    var img = new Image();
    img.src = myChart_2.getDataURL({
        type:"png",
        pixelRatio: 1,
        backgroundColor: '#fff'
    });
     // $('body').append(img);
    },3000);